package com.rysima.wjsima.demo;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class Demo1 {
    public static void main(String[] args) throws IOException {
//        IO流使用
        FileInputStream fis = new FileInputStream("D:\\hhh.png");
        FileOutputStream fos = new FileOutputStream("D:\\hhhh.png");
        int b;
        byte[] bytes = new byte[1024 * 8];
        while ((b = fis.read(bytes)) != -1){
            fos.write(bytes,0,b);
            fos.flush();
        }
    }
}
